package designmodel.builder.折叠构造函数模式;

/**
 * 电脑建造类
 *
 * @author scylla
 * @version V1.0
 * @project echo-java-base
 * @title 电脑建造类
 * @package designmodel.builder
 * @since 2021/12/15 4:20 下午
 */
public class Computer {
    //必须
    private String cpu;
    //必须
    private String ram;
    //可选
    private int usbCount;
    //可选
    private String keyboard;
    //可选
    private String display;

    public Computer(String cpu, String ram) {
               this(cpu,ram,0);
    }

    public Computer(String cpu, String ram, int usbCount) {
        this(cpu,ram,usbCount,"罗技键盘");
    }

    public Computer(String cpu, String ram, int usbCount, String keyboard) {
       this(cpu,ram,usbCount,keyboard,"三星显示器");
    }

    public Computer(String cpu, String ram, int usbCount, String keyboard, String display) {
        this.cpu = cpu;
        this.ram = ram;
        this.usbCount = usbCount;
        this.keyboard = keyboard;
        this.display = display;
    }

}
